/*
 * @Author: your name
 * @Date: 2021-10-20 11:39:46
 * @LastEditTime: 2021-10-20 11:54:37
 * @LastEditors: Please set LastEditors
 * @Description: In User Settings Edit
 * @FilePath: \Vuec:\Users\86131\Desktop\project\payforknowledge\src\store\selected\index.js
 */
import { selectedApi } from "../../utils/api";

const selectedModule = {
  state: {
    selectedList: [],
  },
  mutations: {
    changeSelected(state, payload) {
      state.selectedList = payload.result;
    },
  },
  actions: {
    async getSelected({ commit }) {
      const res = await selectedApi();
      commit("changeSelected", res);
    },
  },
};

export default selectedModule;
